<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWaterFee extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('water_fee', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('water_number')->comment('水表编号');
            $table->string('house_number')->comment('门牌号');
            $table->string('username')->comment('户主姓名');
            $table->integer('start_number')->comment('起始数');
            $table->integer('end_number')->comment('截止数');
            $table->decimal('unit_price',8,2)->comment('单价');
            $table->decimal('cost',8,2)->comment('费用');
            $table->integer('cost_type')->comment('费用类型');
            $table->integer('status')->comment('记录状态 0:删除 1:正常');
            $table->integer('consumption')->comment('用量');
            $table->integer('pay_type')->comment('支付方式 0:未支付 1:微信 2:支付宝 3:现金');
            $table->integer('community_id')->comment('所属小区id');
            $table->integer('pay_status')->comment('付费状态 0:未付款 1:已付款');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('water_fee');
    }
}
